home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr11 / pcv05n12.zip / FLECMMDR.TXT < prev    next >
Text File  |  1993-06-10  |  1KB  |  44 lines

  1. _Send as Mail
  2.     DDETimeOut(60000)
  3.     a=FileItemize("")
  4.     i=ItemCount(a," ")        
  5.     If i==0 Then Goto NoFile
  6.     d=DirGet()
  7.     filecounter=1
  8.     channel=0    
  9.     If WinExist("Lotus Notes")== @False Then Goto LaunchNotes
  10.     :NotesIsRunning    
  11.     channel=DDEInitiate("Notes","SendMail")
  12.     If channel==0 Then Goto LF
  13.     c=DDEExecute(Channel, "NewMessage")
  14.     if C==@False Then Goto DDEError
  15.     :StartCon
  16.     currfile=ItemExtract(fileCounter,a," ")
  17.     currfile=StrCat("Attachfile ",d,currfile,"")
  18.     c=DDEExecute(Channel,currfile)
  19.     if c==@False Then Goto DDEError
  20.     FileCounter=FileCounter+1
  21.     If FileCounter<= i Then Goto StartCon
  22.     c=DDEExecute(Channel,"Send")
  23.     Goto MailDone
  24.         
  25.  
  26.     :LaunchNotes
  27.     RunIcon("C:\NOTES\_BNOTES.EXE","")
  28.     Yield
  29.     Goto NotesIsRunning
  30.     
  31.     :NoFile
  32.     Message("File Commander","You have to select one or more files first!")
  33.     Exit
  34.  
  35.     :LF
  36.     Message("File Commander","Unable to open a DDE channel to Notes!")
  37.     Exit
  38.  
  39.     :DDEError
  40.     Message("File Commander", "A DDE error has occurred!")
  41.     :MailDone
  42.     c=DDETerminate(Channel)
  43.     Exit
  44.